#include "mywork.h"

mywork::mywork(const QString &str,QObject *parent) : QObject(parent)
{
    myworkname = str;
}

void mywork::workstart(QString work)
{
    qDebug() << "当前 Sub 线程" << QThread::currentThreadId();
    QString workrt = myworkname + "正在工作";
    emit workresult(workrt);
    QThread::sleep(2);
    workrt = "工作内容：" + work;
    emit workresult(workrt);
    QThread::sleep(12);
    workrt = "工作完成";
    emit workresult(workrt);
}
